gtk-demo: Use better api
authorMatthias Clasen <mclasen@redhat.com>
Thu, 16 Jul 2020 20:24:49 +0000 (16:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 16 Jul 2020 20:26:41 +0000 (16:26 -0400)
We have a getter for the model, lets use it.

demos/gtk-demo/listview_colors.c

index 449c14b3c600382fadb9c3426e7508f349b9d177..af20292f4ae383f61a1a9b301912b243532f0c7d 100644 (file)
@@ -950,7 +950,8 @@ do_listview_colors (GtkWidget *do_widget)
       g_object_unref (selection_filter);
       g_object_unref (no_selection);
 
-      g_object_get (model, "model", &model, NULL);
+      model = gtk_multi_selection_get_model (GTK_MULTI_SELECTION (model));
+      g_object_ref (model);
 
       selection_info_toggle = gtk_toggle_button_new ();
       gtk_button_set_icon_name (GTK_BUTTON (selection_info_toggle), "emblem-important-symbolic");